package com.munoor.dalai.server.model;

import java.io.Serializable;

/**
 * 
 * 
 */

public class ListingView implements Serializable {
	private static final long serialVersionUID = 1L;

	private Listing listing;
	/*
	 * private long listingId; private int ageMax; private int ageMin; private
	 * String longDesc; private int salaryMax; private int salaryMin; private
	 * String shortDesc; private String title; private int views; private short
	 * active; private long expiry; private long released;
	 */
	private String category; // ok
	private String company;  
	private String level;  // ok
	private String location; // ok
	//private String source;

	public ListingView(Listing l) {
		this.listing = l;
		category = DataMapService.getCategory(listing.getCategoryId());
		location = DataMapService.getLocation(listing.getLocationId());
		switch (listing.getLevelId()) {
		case 1: // entry level
			level = "0-3 yrs";
			break;
		case 2:
			level = "3-7 yrs";
			break;
		case 3:
			level = "7-15 yrs";
			break;
		case 4:
			level = "15+ yrs";
			break;
		default:
			level = "Not specified";
		}
	}

	public ListingView() {
	}

	public long getListingId() {
		return listing.getListingId();
	}

	public int getAgeMax() {
		return listing.getAgeMax();
	}

	public int getAgeMin() {
		return listing.getAgeMin();
	}

	public long getExpiry() {
		return listing.getExpiry();
	}

	public String getLongDesc() {
		return listing.getLongDesc();
	}

	public long getReleased() {
		return listing.getReleased();
	}

	public int getSalaryMax() {
		return listing.getSalaryMax();
	}

	public int getSalaryMin() {
		return listing.getSalaryMin();
	}

/*	public String getShortDesc() {
		return listing.getShortDesc();
	}*/

	public String getTitle() {
		return listing.getTitle();
	}

	public int getViews() {
		return listing.getViews();
	}

	public short getActive() {
		return listing.getActive();
	}

	public String getCategory() {
		return category;
	}

	public String getCompany() {
		return company;
	}

	public String getLevel() {
		return level;
	}

	public String getLocation() {
		return location;
	}

	/*public String getSource() {
		return source;
	}*/

	public void setCompany(String company) {
		this.company = company;
	}

}